package ooday03;

public class InterfaceDemo {
    public static void main(String[] args) {
        //Inter 0 = new Inter(); //编译错误，接口不能实例化
    }
}

interface Inter{
    abstract void show();
    void run();  //接口中的方法默认都是抽象的，前面默认有abstract
    //void test(){}  //编译错误，抽象方法不能有方法体
}

class InterImpl implements Inter{
    public void show(){ //重写接口中的抽象方法时，必须加public
    }
    public void run(){

    }
}

interface  Inter1{
    void show();
}
interface Inter2{
    void test();
}
abstract class Aoo{
    abstract void say();
}
class Boo extends Aoo implements Inter1,Inter2{
    public void show() {}
    public void test() {}
    void say() {}
}
//演示接口的继承
interface Inter3{
    void show();
}
interface Inter4 extends Inter3{
    void test();
}
interface Inter5 extends Inter3,Inter4{  //接口可以实现多继承
    void say();
}
class Coo implements Inter5{
    public void show(){}
    public void test(){}
    public void say(){}
}
